package com.sigmatrix.h5.entity.base;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sigmatrix.h5.entity.base.ScModel;

import io.swagger.annotations.ApiModelProperty;

/**
 * 实体父类
 */
public class SuperEntity<T extends ScModel<T>> extends ScModel<T> {

    /**
	 * 
	 */
	private static final long serialVersionUID = -7413881080852498119L;
	/**
     * 主键ID 
     */
    @TableId(value="_id",type=IdType.AUTO)
    protected Integer id;
    
    @JsonIgnore
    @ApiModelProperty(hidden = true)
    @TableField(exist=false)
    private String tablePrefix;

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

	public String getTablePrefix() {
		return tablePrefix;
	}

	public void setTablePrefix(String tablePrefix) {
		this.tablePrefix = tablePrefix;
	}
    
}
